{extend name="web/public/base" /}
{block name="header"}
{/block}
{block name="main"}
<section class="scrollable padder">
    <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
        <li><a><i class="fa fa-home"></i> 首页</a></li>
        <!--<li class="active">会员管理</li>-->
        <li class="active">{$title}</li>
    </ul>
    <div class="row">
        <div class="col-sm-12">
            <section class="panel panel-default">
                <header class="panel-heading"> {$title}</header>
                {include file="web/public/search" /}
                {notempty name="_list"}
                <div class="table-responsive">
                    <table class="table table-striped table-hover b-t b-light text-sm">
                        <thead>
                        <tr>
                            <th>会员账号</th>
                            <th>相关会员</th>
                            <th>额度</th>
                            <th>更新时间</th>
                        </tr>
                        </thead>
                        <tbody>
                        {volist name='_list' id='vo'}
                        <tr>
                            <td>{$vo.usernumber}</td>
                            <td>{$vo.fusernumber}</td>
                            <td>{$vo.money}</td>
                            <td>{$vo.create_time}</td>
                        </tr>
                        {/volist}
                        </tbody>
                    </table>
                </div>
                <footer class="panel-footer">
                    <div class="row">
                        <div class="text-right text-center-xs">
                            {$page}
                        </div>
                    </div>
                </footer>
                {else/}
                <div style="text-align: center">
                    <image src="__PUBLIC__/images/empty.jpg"></image>
                </div>

                {/notempty}
            </section>
        </div>
    </div>
</section>
{/block}
{block name="script"}
<script type="text/javascript">
    function audit(id) {
        layer.confirm('请选择审核结果？', {
            btn: ['同意', '拒绝'],
            closeBtn: false,
            shadeClose: true,
        }, function () {
            $.post("{:url('handleUpdate')}", {status: 1, id: id}, function (data) {
                layer.closeAll();
                layer.msg(data.msg);
//                console.log(data)
                if (data.code == 1) {
                    setTimeout(function () {
                        location.reload();
                    }, 1000)
                }
            }, "json");
            return false;
        }, function () {
            $.post("{:url('handleUpdate')}", {status: -1, id: id}, function (data) {
                layer.closeAll();
                layer.msg(data.msg);
                if (data.code == 1) {
                    setTimeout(function () {
                        location.reload();
                    }, 1000)
                }
            }, "json");
            return false;
        });
    }
</script>
{/block}
{block name="footer"}
{/block}